package com.xiaozhen.tcp.factory.operator;


import com.xiaozhen.common.core.utils.ArithUtils;

/**
 * @author zhenweisheng
 * @date 2020/8/14 13:17
 * @description:
 */
public class DivOperator implements Operator {

    @Override
    public Double calculation(Double numberA, Double numberB) {
        if (numberB == 0D) {
            throw new RuntimeException("除数不能为0");
        }
        return ArithUtils.div(numberA, numberB);
    }

}
